<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>


<div id="flightList" "class="section"><c:if test="${ flightList != null && empty flightList}">
	<h2>${flightTitle} Flight List</h2>

	<tr>
		<td colspan="7">No flights found</td>
	</tr>
</c:if> <c:if test="${!empty flightList}">
	<h2>${flightTitle} Flight List</h2>


	<table class="summary">
		<thead>
			<tr>
				<th>Flight Number</th>
				<th>Depart City</th>
				<th>Depart Date</th>
				<th>Depart Time</th>
				<th>Arriving City</th>
				<th>Arriving Date</th>
				<th>Arriving Time</th>
				<th>Seats Available</th>
				<th>Flight Miles</th>				
			</tr>
		</thead>
		<tbody>
			<c:forEach var="flight" items="${flightList}">
				<tr>
					<td><a href="${flowExecutionUrl}&_eventId=proceed&flightId=${flight.id}"> ${flight.flightNumber} </a></td>
					<td>${flight.departingCity.name}</td>
					<td>${flight.formattedDepartureDate}</td>
					<td>${flight.departureTime}</td>
					<td>${flight.destinationCity.name}</td>
					<td>${flight.formattedArrivingDate}</td>
					<td>${flight.formattedArrivingTime}</td>
					<td>${flight.seatAvailable}</td>
					<td>${flight.flightMiles}</td>					

				</tr>
			</c:forEach>
		</tbody>
	</table>
</c:if> 


<%-- 
<c:url value="/spring/jsp/booking" />?execution=${flowExecutionKey}
--%>



<div class="buttonGroup">
<a href="${flowExecutionUrl}&_eventId=cancel">Cancel</a>
</div>



</div>